[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 closegraph()            Shut Down the Graphics System

 #include   <graphics.h>

 void far   closegraph(void);

    closegraph() shuts down the graphics system by deallocating  all the
    memory that was allocated by initgraph().  The screen is restored to
    the mode it was in before initgraph() was called.  closegraph() is a
    graphics system control function and should be the last graphics
    function called.

    Returns:    Nothing.

   -------------------------------- Example ---------------------------------

    The following statements open and close a graphic system. 'gdriver'
    is set to the constant DETECT and therefore 'gmode' is set to the
    highest resolution available for the detected driver.

           #include <graphics.h>

           int gdriver = DETECT;
           int gmode;

           main()
           {
               initgraph(&gdriver,&gmode,"");
               .
               .
               /* graphic operations */
               .
               .
               closegraph();
           }


See Also: _graphgetmem() initgraph() restorecrtmode()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson